package zju.dgm.service.distsqlservice;

import zju.dgm.dto.DFFilter;
import zju.dgm.dto.DataFrame;

public class ListenerFilter implements DFFilter {

    @Override
    public boolean isWanted(DataFrame df) {
        if (df == null) return false;
        switch (df.getType()){
            case DataFrame.SERVER_REQUEST:
            case DataFrame.MASTER_WRITE_REQ:
            case DataFrame.SERVER_TRANSFER_WRITE:
            case DataFrame.UNDO_REQUEST:
                return true;
        }
        return false;
    }
}
